package com.xu.service.impl;

import com.xu.dao.StudentDao;
import com.xu.pojo.Student;
import com.xu.service.StudentService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao=null;

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public List<Student> selectAllStudents() {
        return studentDao.selectAllStudents();
    }

    @Override
    public List<Student> selectStudentById(int id) {

        return studentDao.selectStudentById(id);
    }

    @Override
    public int insertStudent(Student student) {
        return studentDao.insertStudent(student);
    }

    @Override
    public int updateStudent(Student student) {
        return studentDao.updateStudent(student);
    }

    @Override
    public int deleteStudentById(int id) {

        return studentDao.deleteStudentById(id);
    }
}
